﻿using Quickly.Identity.Services;

namespace Quickly.Identity.API.Endpoints
{
    public static class DefaultEndpoints
    {
        public static IEndpointRouteBuilder MapDefaultEndpoints(this IEndpointRouteBuilder endpoints)
        {
            ArgumentNullException.ThrowIfNull(endpoints, nameof(endpoints));

            var routeGroup = endpoints.MapGroup("")
                .WithOpenApi()
                .WithTags("Default");

            routeGroup.MapPost("/login", Login.ExecuteAsync).WithName("Login");

            return routeGroup;
        }
    }
}
